package framework.event;

import framework.api.KieBaseConfiguration.KieBaseOption;

public enum EventProcessingOption implements KieBaseOption {

    CLOUD("cloud"),
    STREAM("stream");

    private String             string;

    EventProcessingOption(String mode) {
        this.string = mode;
    }

    public String getMode() {
        return string;
    }

    public static EventProcessingOption determineEventProcessingMode(String mode) {
        if ( STREAM.getMode().equalsIgnoreCase( mode ) ) {
            return STREAM;
        } else if ( CLOUD.getMode().equalsIgnoreCase( mode ) ) {
            return CLOUD;
        }
        throw new IllegalArgumentException( "Illegal enum value '" + mode + "' for EventProcessingMode" );
    }
}
